package org.merak.core.persistence.jdbc;

import org.merak.core.model.SingletonHolder;

class RecoveryManager {

	//~ Static ///////////////////////////////////////////////////////////////////
	//****************************************************************************
	private static final SingletonHolder singleton = new SingletonHolder() {
		@Override
		public Object newInstance() {
			return new RecoveryManager();
		}
	};

	//~ Methods //////////////////////////////////////////////////////////////////
	//****************************************************************************
	/** Provides the singleton instance of this class */
	public static RecoveryManager getInstance() {
		return (RecoveryManager) singleton.getInstance();
	}
	//****************************************************************************
	public void restore(XConnection conn,Throwable cause) {

		// Restore the connection
		new RecoveryJob(conn).start();

	}
	//****************************************************************************

}
